package nsd.test.zy03;

public class Circle extends Shape {
    private double radius;

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public Circle(double radius) {
        this.radius = radius;
    }

    public Circle(String color) {
        super(color);
    }

    @Override
    public double getPer(){
        double per=2*radius*3.14;
        return per;
    }
    @Override
    public double getArea(){
        double area=radius*radius*3.14;
        return area;
    }
    @Override
    public void showAll(){
        System.out.println("圆的周长是："+getPer());
        System.out.println("圆的面积是："+getArea());
    }
}
